import java.util.Arrays;

/**
 * <pre>
 * - 可变参数
 * Author : J.L.Zhou
 * E-Mail : 2233875735@qq.com
 * Tel : 151 1104 7708
 * Date : 2021-03-19 11:57
 * Version : 1.0
 * Copyright 2021 jlzhou.top Inc. All rights reserved.
 * Warning: this content is only for internal circulation of the company.
 *          It is forbidden to divulge it or use it for other commercial purposes.
 * </pre>
 **/
public class ParamsTest {

  public static void main(String[] args) {
    ParamsTest p = new ParamsTest();
    p.test1(new int[]{1,2,3});
    p.test2(new int[]{4,5,6});
    p.test2();
    p.test2(7);
    p.test2(7,8);
    p.test2(7,8,9);
  }

  public void test1(int[] args){
    System.out.println(Arrays.toString(args));
  }

  public void test2(int... args){
    System.out.println(Arrays.toString(args));
  }
}
